
<!-- CSS样式学习 -->

<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>CSS样式学习</title>
    <link rel="stylesheet" type="text/css" href="2-CSS\main.css"/>
</head>
<style>
    div{
        font-size: 20px;
    }
    .myDiv{
        color: brown;
    }
    #myDivId{
        color: rgb(13, 0, 255);
    }
    .btn a {
        color: aliceblue;
        border: 2px solid blue;
        background-color: blue;
        padding: 5px; 
        display: inline-block; 
        text-decoration: none; 
        border-radius: 4px;
        cursor: pointer;
    }
    .btn a:hover {
        /* 鼠标悬停时变深蓝色 */
        background-color: darkblue; 
    }
    
</style>
<body>
    <div class="btn">
        <a href="https://www.baidu.com">百度⼀下</a>
        <p>我是p标签</p>
        <h1>我是h1标签</h1>
    </div>
    <div class="myDiv">
        myDiv类的div1
    </div>
    <div class="myDiv">
        myDiv类的div2
    </div>
    <div class="myDiv">
        myDiv类的div3
    </div>
    <div class="myDiv">
        myDiv类的div4
    </div>
    <!-- id不要重复 -->
    <div id="myDivId">
        id为myDiv的div1
    </div>
    <div class="font">
        斜体1111
    </div>
    <div class="ext">
        <p>
            <td>1</td>
            <td>2</td>
            <td>3</td>
            <div>1</div>
            <div>2</div>
            <div>3</div>
        </p>
    </div>
</body>
</html>